﻿<link href="~/Scripts/weibo/styles/CustomerIndex.css" rel="stylesheet" />
<link href="~/Scripts/weibo/styles/global.css" rel="stylesheet" />
<script src="~/Scripts/weibo/script/CustomerIndex.js"></script>
<script src="~/Scripts/weibo/script/trim.js"></script>
<script src="~/Scripts/weibo/script/jquery-1.6.2.min.js"></script>
<script src="~/kindeditor/kindeditor-all.js"></script>
<script type="text/javascript">
    KindEditor.ready(function (K) {
        var options = {
            uploadJson: '/kindeditor/upload_json.ashx',
            fileManagerJson: '/kindeditor/file_manager_json.ashx',
            allowFileManager: true,

        };
        window.editor = K.create('#textfield2', options);
    });
    function btnclick() {
        editor.sync();
        txtObj = document.getElementById('textfield2');
        txtObj.value = trim(txtObj.value);
        var u = changetxt(txtObj.value);
        //$.ajax({
        //    url: "/Default/Add",
        //    data: { "con": u },
        //    success: function (result) {
        //        if (result == "true") {
        //            window.location.href = "/Default/Customer"
        //        }
        //    }

        //})
        if (txtObj.value.length > 0) {
            var str = changetxt(txtObj.value);//替换文本框中的表情
            var time = inittime();//取出当前时间
            //需要放入数据库的内容
            var innerht = "<div class='stateShow' onmouseover='stateMouseOver(this)' onmouseout='stateMouseOut(this)'><div class='stateShowWord'><table width='450' border='0' cellpadding='0' cellspacing='0' class='stateTable'><tr><td width='70' align='center' valign='top'><a href='#'><img src='images/MainRightFirstLineTitle.gif' alt='' width='48' height='48' /></a></td><td width='380'><a href='#'>DarkDemon</a><img src='images/1.gif' align='absmiddle' style='border:none;' />&nbsp;" + str + "</td></tr></table></div><div class='stateImgShow'></div><div class='stateShowtime'>" + time + "</div><div class='stateOp'><a onclick='reXianShi(this)' class='opState'>回复</a><a class='opState'>转发</a><a onclick='delState(this)' class='opState'>删除</a></div><div class='huifu'></div></div>";



            var divObj = document.getElementById("mainBannerContent");


            divObj.innerHTML = innerht + divObj.innerHTML;

        }

        txtObj.value = "";//清空文本框
        changeDivHeight();//重设页面高度
    }
</script>
<div>
    <div id="mainBannerTopIssueForm">
        <!--id="mainBannerTopIssueFrame-->
        <div id="mainBannerTopIssueFrame">
            <textarea id="textfield2" style="overflow:hidden;border:1px #0CF solid;" name="textDiv"></textarea>
        </div>
        <!--id="mainBannerTopIssueInsert 插入链接-->
        <div id="mainBannerTopIssueInsert">
            <!--4个小div-->
        </div>
        <!--确认发布-->
        <div id="mainBannerTopIssueSure" style="margin-top:40px;">
            <input type="submit" name="name" value="发布" id="btn1" onclick="btnclick()" />
        </div>
    </div>
</div>
